using System;
using Ewk.MachineLearning.Classification.Interfaces;

namespace Ewk.MachineLearning.Classification.Common
{
    public class TextEntityComparer<T> :
        Comparer<ITextEntity>
        where T : ITextEntity
    {
        public TextEntityComparer()
            : base((x, y) => String.Compare(x.Text, y.Text, StringComparison.Ordinal),
                   x => x.Text.GetHashCode())
        {
        }
    }
}